A standard magnetically coded lock has a lock housing in which a latch element can slide between a locked position and an unlocked position. In the locked position the mechanism holds the drawer, door, safety-deposit box, or the like closed, while in the unlocked position it can be opened. The lock typically has a plurality of movable wheels or elements that carry magnets that can coact with magnets on a key to move into a position permitting the latch element to move into the unlocked position. Thus when the key is inserted into the lock, the magnetic elements in the lock are moved by the magnets on the key into an aligned position permitting the lock to be opened.
While such an arrangement can provide a high degree of security it has the substantial disadvantage that the coding of the lock and key are set at the factory and are not readily changeable by the end user. Thus if a key is lost, a new one must be obtained from the manufacturer. In addition it is impossible or extraordinarily difficult for the end user of the lock to change the combination or coding.